<include file="Public/sui_header" />



	<table class="sort-table">
		<tr>
			<td>
				<a 
					<if condition="$_GET['order'] eq '' OR $_GET['order'] eq 'id'">
					href="__ACTION__/order/id desc"
					class="sort-active" 
					> 默认<i class="fa fa-sort-numeric-asc"></i>
					<elseif condition="$_GET['order'] eq 'id desc'"/>
					href="__ACTION__/order/id"
					class="sort-active" 
					> 默认<i class="fa fa-sort-numeric-desc"></i> 
					<else/>
					href="__ACTION__/order/id"
					> 默认<i class="fa fa-sort-numeric-asc"></i>
					</if>
				</a>
			</td>
			<td>
				<a 
					<if condition="$_GET['order'] eq 'already_num'">
					href="__ACTION__/order/already_num desc"
					class="sort-active" 
					> 人气<i class="fa fa-sort-numeric-asc"></i>
					<elseif condition="$_GET['order'] eq 'already_num desc'"/>
					href="__ACTION__/order/already_num"
					class="sort-active" 
					> 人气<i class="fa fa-sort-numeric-desc"></i> 
					<else/>
					href="__ACTION__/order/already_num"
					> 人气<i class="fa fa-sort-numeric-asc"></i>
					</if>
				</a>
			</td>
			<td>
				<a 
					<if condition="$_GET['order'] eq 'funding_price desc'">
					href="__ACTION__/order/funding_price"
					class="sort-active" 
					> 价格<i class="fa fa-sort-numeric-desc"></i>
					<elseif condition="$_GET['order'] eq 'funding_price'"/>
					href="__ACTION__/order/funding_price desc"
					class="sort-active" 
					> 价格<i class="fa fa-sort-numeric-asc"></i> 
					<else/>
					href="__ACTION__/order/funding_price"
					> 价格<i class="fa fa-sort-numeric-asc"></i>
					</if>
				</a>
			</td>
			<td>
				<a href="#" class="open-panel" data-panel='#select-panel-funding'>筛选</a>
				<i class="fa fa-reorder"></i>
			</td>
		</tr>
	</table>
	<volist name="list" id="vo">
	    <div class="card">
	        <div class="card-header">
	            <span class="icon icon-friends"></span>
	            {$vo['name']} 
	        </div>
	        <div class="card-content">
	            <div class="card-content-inner">

	            	<div class="row">
				      <div class="col-20" style="width:30%">
	                    	<img class="list-img" src="__PUBLIC__/file/{$vo['img']}" />
				      </div>
				      <div class="col-50" style="width:60%">
				      		<php>
				      			$fundingType = D('FundingType')->find($vo['funding_type']);
				      			$fundingModel = D('Funding'.ucfirst($fundingType['en']));
				      			
				      			$fundingSpecify = $fundingModel->where(['principal_id'=>$vo['id']])->find();
				      			
				      		</php>
				      		众筹价格：￥{$vo['funding_price']} <br/>
				      		<?php
				      		?>
				      		<if condition="$fundingType['en'] eq 'eat'">
				      			餐饮类型：{$fundingSpecify['eat_type']}<br/>
				      			用餐时间：{$fundingSpecify['eat_time']|date="Y-m-d H", ###}时<br/>
				      			用餐地点：{$fundingSpecify['eat_location']}<br/>
				      		<elseif condition="$fundingType['en'] eq 'hotel'"/>
				      			酒店类型：{$fundingSpecify['hotel_type']}<br/>
				      			入住时间：{$fundingSpecify['start_time']|date="Y-m-d", ###}<br/>
				      			离店时间：{$fundingSpecify['end_time']|date="Y-m-d", ###}<br/>
				      			酒店地点：{$fundingSpecify['hotel_location']}<br/>
				      		<elseif condition="$fundingType['en'] eq 'traffic'"/>
				      			交通方式：{$fundingSpecify['traffic_type']}<br/>
				      			出发地：{$fundingSpecify['departure']}<br/>
				      			目的地：{$fundingSpecify['destination']}<br/>
				      			出发时间：{$fundingSpecify['start_time']|date="Y-m-d H:i:s", ###}<br/>
				      		<elseif condition="$fundingType['en'] eq 'travel'"/>
				      			旅游类型：{$fundingSpecify['travel_type']}<br/>
				      			出发地：{$fundingSpecify['departure']}<br/>
				      			目的地：{$fundingSpecify['destination']}<br/>
							<elseif condition="$fundingType['en'] eq 'specialty'"/>
				      			旅游类型：{$fundingSpecify['specialty_type']}<br/>
				      			源产地：{$fundingSpecify['origin']}<br/>
				      			发货时间：{$fundingSpecify['delivery_time']}<br/>
							<elseif condition="$fundingType['en'] eq 'play'"/>
								娱乐类型：{$fundingSpecify['play_type']}<br/>
				      			地点：{$fundingSpecify['play_location']}<br/>
				      			时间：{$fundingSpecify['play_time']|date="Y-m-d H:i:s", ###}<br/>
				      		</if>
				      		已筹{$vo['already_num']}人/还剩{$vo['total_num'] - $vo['already_num']}人 <br/>
				      </div>
				    </div>
	                <div class="list-desc">
	                    {$vo['special']}
	                </div>
	            </div>
	        </div>
	        <div class="card-footer">
                <php> $tel = D('user')->find($vo['user_id']);</php>
                <a href="tel:{$tel[username]}" class="button"><span class="icon icon-phone"></span> 联系TA</a>
                <eq name="$vo['transaction_type']" value='定制'>
                	<a href="{:U('Funding/contract', ['id'=>$vo['id']])}" class="button"><span class="fa fa-file-text-o"></span> 合同</a>
                </eq>
	            <a href="{:U('Funding/detail', ['id'=>$vo['id']])}" class="button"><span class="icon icon-search"></span> 查看详情</a>
	        </div>
	    </div>
</volist>
{$page}
<include file="Public/sui_footer" />
